<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="jtable/themes/redmond/jquery-ui-1.8.16.custom.css"
	rel="stylesheet" type="text/css" />
<link href="jtable/themes/lightcolor/blue/jtable.css" rel="stylesheet"
	type="text/css" />
<script type="text/javascript" src="js/jquery-1.8.2.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.9.1.custom.js"></script>
<script type="text/javascript" src="js/jquery-ui.js"></script>
<script type="text/javascript" src="jtable/jquery.jtable.js"></script>
<script type="text/javascript" src="jtable/jtablesite.js"></script>
<script type="text/javascript" src="jtable/modernizr-1.7.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-timepicker-addon.js"></script>

<title>Insert title here</title>
<script type="text/javascript">
	$(document).ready(
			status()
	);	function shutdown(){
		$.get('Scheduler?event=stop',function(data){display(data);},"json");
	}
	function startup() {
		$.get('Scheduler?event=start',function(data){display(data);},"json");
	}
	function status () {
		
		$.get('Scheduler?event=status',function(data){display(data);},"json");
	}
	function display(data){
		
		if(data.status == true){
			var displayString ='<h3>The scheduler is running now! you can click </h3><br/><button type="button" onclick="shutdown();">shutdown</button>';
			
			$('#SchedControlPanel').html(displayString);
		}
		else if(data.status==false){
			var displayString ='<h3>The scheduler is down now! you can click</h3> <br/> <button type="button" onclick="startup();">startup</button>';
			
			$('#SchedControlPanel').html(displayString);
		}
	}
</script>
</head>
<body>
<center>
<div id="SchedControlPanel">
	
</div>
</center>
</body>
</html>